<?php

use App\Enums\ReceptionType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateReceptionLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('reception_logs', function (Blueprint $table) {
            $table->id();
            $table->unsignedTinyInteger('type')->default(ReceptionType::SALE)->comment('类型');
            $table->string('user_ids')->default('')->comment('接待员工的id顺序,英文逗号分隔');
            $table->string('user_name')->default('')->comment('接待员工的花名');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('reception_logs');
    }
}
